package com.wfs.branch;

/**
 * 学习了解if 语句
 */
public class IfDemo1 {
    public static void main(String[] args) {

    }

    /*
      三种if 语句
     */
    public static void print1() {
        int a = 10;
        int b = 20;
        if (a > b) {
            System.out.println("a > b");
        }
    }

    public static void print2() {
        int a = 10;
        int b = 20;
        if (a > b) {
            System.out.println("a > b");
        } else {
            System.out.println("a <= b");
        }
    }

    public static void print3() {
        int a = 10;
        int b = 20;
        if (a > b) {
            System.out.println("a > b");
        } else if (a == b) {
            System.out.println("a == b");
        } else {
            System.out.println("a <= b");
        }
    }
}
